#!/bin/sh

CWD="`pwd`"
BWD="`dirname $0`"

cd "$BWD"

BWD="`pwd`"

if [ ! -f "$BWD/dep/nspr/Makefile" ]
then
	cd "$BWD/dep/nspr/"
	
	./configure --prefix="$BWD/obj/nspr/" --disable-debug --enable-optimize
fi

if [ ! -f "$BWD/dep/js/src/Makefile" ]
then
	cd "$BWD/dep/js/src/"
	
	autoconf213
	
	./configure --prefix="$BWD/obj/js/" --disable-shared-js --enable-ctypes --with-nspr-prefix="$BWD/obj/nspr/"
fi